import React, { Component } from 'react';

class App extends Component {
  state={
    value:'readonly',
    isChecked: true,
  }
  render() {
    return (
      <div>
        {/* 设置表单默认值的方法 */}
        {/* <input type="text" name="" id="" value={this.state.value} readOnly/> */}
        {/* <input type="text" name="" id="" defaultValue={this.state.value} /> */}
        <input type="checkbox" checked={this.state.isChecked} readOnly/>
        <input type="checkbox" defaultChecked={this.state.isChecked} />
      </div>
    );
  }
}

export default App;
